package com.demo.modalframe4;

import com.formdev.flatlaf.FlatDarculaLaf;
import com.formdev.flatlaf.FlatIntelliJLaf;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;

import javax.swing.*;

@SpringBootApplication
public class ModalFrame4Application {

    public ModalFrame4Application() {
        try {
            UIManager.setLookAndFeel(new FlatIntelliJLaf());
        } catch (Exception ex) {
            ex.printStackTrace();
        }

        SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                ModalityDemo md = new ModalityDemo();
                md.createAndShowGUI();
                md.start();
            }
        });
    }

    public static void main(String[] args) {
//        SpringApplication.run(ModalFrame4Application.class, args);
        SpringApplicationBuilder builder = new SpringApplicationBuilder(ModalFrame4Application.class);
        builder.headless(false).run(args);
    }

}
